<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<div th:fragment="sidebar" id="sidebar" class="sidebar sidebar-fixed responsive ace-save-state">
    <script type="text/javascript">
        try {
            ace.settings.loadState('sidebar')
        } catch (e) {
        }
    </script>

    <ul class="nav nav-list">
        <li class="active">
            <a href="#" th:href="@{management}">
                <i class="menu-icon fa fa-home"></i>
                <span class="menu-text"> 系统首页 </span>
            </a>
            <b class="arrow"></b>
        </li>

        <li th:if="${#arrays.contains(session.sysUser.permissionIds, '1')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-user-circle"></i>
                <span class="menu-text">
								管理员管理
							</span>
                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="manager">
                        <i class="menu-icon fa fa-caret-right"></i>
                        管理员列表
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="role">
                        <i class="menu-icon fa fa-caret-right"></i>
                        角色列表
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>

        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'2')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-users"></i>
                <span class="menu-text">
								用户管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="user">
                        <i class="menu-icon fa fa-caret-right"></i>
                        用户列表
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'3')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-shopping-cart"></i>
                <span class="menu-text">
								商品管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="type">
                        <i class="menu-icon fa fa-caret-right"></i>
                        商品分类
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="goods">
                        <i class="menu-icon fa fa-caret-right"></i>
                        树苗/果树商品列表
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="pointGoods">
                        <i class="menu-icon fa fa-caret-right"></i>
                        果实/积分商品列表
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'4')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-leaf"></i>
                <span class="menu-text">
								种植管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="tree">
                        <i class="menu-icon fa fa-caret-right"></i>
                        果树列表
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="aboutPrice">
                        <i class="menu-icon fa fa-caret-right"></i>
                        报价相关
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="treeOrder">
                        <i class="menu-icon fa fa-caret-right"></i>
                        平台收购果树订单
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="ss">
                        <i class="menu-icon fa fa-caret-right"></i>
                        平台收购果实订单
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="fruitMarket">
                        <i class="menu-icon fa fa-caret-right"></i>
                        用户间果实交易订单
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="treeMarket">
                        <i class="menu-icon fa fa-caret-right"></i>
                        用户间果树交易订单
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'5')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-tachometer"></i>
                <span class="menu-text">
								图片管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="homeImage">
                        <i class="menu-icon fa fa-caret-right"></i>
                        轮播图管理
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="adv">
                        <i class="menu-icon fa fa-caret-right"></i>
                        广告图管理
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'6')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-commenting"></i>
                <span class="menu-text">
								反馈
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="feedback">
                        <i class="menu-icon fa fa-caret-right"></i>
                        投诉列表
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'7')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-money"></i>
                <span class="menu-text">
								订单管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="order">
                        <i class="menu-icon fa fa-caret-right"></i>
                        订单管理
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'8')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-shopping-cart"></i>
                <span class="menu-text">
								活动管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="ticket">
                        <i class="menu-icon fa fa-caret-right"></i>
                        优惠券
                    </a>
                    <b class="arrow"></b>
                </li>
                <li class="">
                    <a href="#" data-url="discount">
                        <i class="menu-icon fa fa-caret-right"></i>
                        限时折扣
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds, '9')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon  fa fa-bar-chart-o"></i>
                <span class="menu-text">
								统计管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <!--<ul class="submenu">
                <li class="">
                    <a href="#" data-url="sell">
                        <i class="menu-icon fa fa-caret-right"></i>
                        销量统计
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="finance">
                        <i class="menu-icon fa fa-caret-right"></i>
                        财务统计
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>-->
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="withdraw">
                        <i class="menu-icon fa fa-caret-right"></i>
                        提现申请
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
        <li th:if="${#arrays.contains(session.sysUser.permissionIds,'10')}" class="">
            <a href="#" class="dropdown-toggle">
                <i class="menu-icon fa fa-comments"></i>
                <span class="menu-text">
								客服管理
							</span>

                <b class="arrow fa fa-angle-down"></b>
            </a>
            <b class="arrow"></b>
            <ul class="submenu">
                <li class="">
                    <a href="#" data-url="service">
                        <i class="menu-icon fa fa-caret-right"></i>
                        客服列表
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>

    </ul><!-- /.nav-list -->

    <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
        <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state"
           data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
    </div>

    <script>
        $(function () {
            $(".submenu li").on("click", function () {
                $(".nav li").removeClass("active");
                $(this).addClass("active");
                $(this).parent().parent().addClass("active");

                $("#right_content").load("management/" + $(this).find("a").data("url"));
            });
        });
    </script>

</div>
</html>